package com.tv.cms.utils;
import java.lang.reflect.Field;
/**
 * TODO
 *
 * @author
 * @date
 **/
public class ObjectUtils {
    public static boolean anyNull(Object obj) {
        Field[] fields = obj.getClass().getDeclaredFields();
        for (Field field : fields) {
            field.setAccessible(true);
            try {
                Object value = field.get(obj);
                if (value == null) {
                    return true;
                }
                if (value instanceof String && ((String) value).isEmpty()) {
                    return true;
                }
            } catch (IllegalAccessException e) {
                // 处理异常
                e.printStackTrace();
                return false;
            }
        }
        return false;
    }
}
